<?php

/**
 * @Author: Wang Chunsheng 2192138785@qq.com
 * @Date:   2020-03-14 13:05:14
 * @Last Modified by:   Wang Chunsheng 2192138785@qq.com
 * @Last Modified time: 2020-04-09 15:14:54
 */

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel common\models\DdGoodsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '商品';
$this->params['breadcrumbs'][] = $this->title;
?>
<ul class="nav nav-tabs">

    <li class="active">
        <?= Html::a('商品管理', ['index'], ['class' => 'btn btn-primary']) ?>
    </li>
    <li>
        <?= Html::a('添加商品', ['create'], ['class' => '']) ?>
    </li>
</ul>
<div class="firetech-main" style="margin-top:20px;">

    <div class="dd-goods-index ">
        <?php echo $this->render('_search', ['model' => $searchModel]);  ?>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">商品列表</h3>
            </div>
            <div class="box-body">
                <?= GridView::widget([
                    'dataProvider' => $dataProvider,
                    // 'filterModel' => $searchModel,
                    'columns' => [
                        // ['class' => 'yii\grid\SerialColumn'],

                        'goods_id',
                        'goods_name',
                        'category_id',
                        'spec_type',
                        'deduct_stock_type',
                        //'content:ntext',
                        //'sales_initial',
                        //'sales_actual',
                        //'goods_sort',
                        //'delivery_id',
                        //'goods_status',
                        //'is_delete',
                        //'wxapp_id',
                        //'create_time:datetime',
                        //'update_time:datetime',

                        ['class' => 'yii\grid\ActionColumn'],
                    ],
                ]); ?>


            </div>
        </div>
    </div>
</div>